home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / HEDGE11.ZIP / HEDGE.DOC < prev    next >
Text File  |  1995-02-12  |  10KB  |  241 lines

  1.  
  2.                                    Hedge Row
  3.  
  4.                        Copyright 1993-1995 Diana Gruber
  5.  
  6. This game is one of many I have on my hard disk that I never quite finished.
  7. I am releasing it now, with source code, in the hope that some other game
  8. programmers will find it useful. Feel free to dissect and re-use this code,
  9. and write "real" games based on it.
  10.  
  11. Hedge Row has several features that make it interesting. It was my first
  12. attempt at an SVGA game. It runs in an 800x600x256 video mode, and uses two
  13. physical pages (video memory) and one logical page (EMS or XMS). In this
  14. sense, it is a resource-intensive program. Yet the EXE size is tiny and the
  15. program uses less than 100K of conventional RAM.
  16.  
  17. Another interesting feature is the recursive maze solution. This is one of
  18. those problems they love to give you in computer science classes. Students who
  19. want to turn in my code to satisfy their homework assignments have my
  20. permission to do so.
  21.  
  22. The mouse motion is also interesting. The mouse is constrained to the maze
  23. paths; it will not go off the path into illegal areas. This was hard code to
  24. write. Looking at it, it doesn't look that difficult, but I remember I had a
  25. real hard time writing it.
  26.  
  27. Running Hedge Row
  28. -----------------
  29. Just type HEDGE. Follow the simple instructions on the screen. If you get
  30. stuck, press F1 for help.
  31.  
  32. Cheat mode
  33. ----------
  34. Maze tile paths are drawn in two colors. The true path is drawn in palette 7,
  35. and the other paths are drawn in palette 5. Both palettes are set to white,
  36. but you can change the color of the true path by using the "cheat mode".
  37.  
  38. Press 'c' to activate the cheat mode. This will change the color of the true
  39. path from white to light blue. Pressing 'c' again will change it back. The
  40. cheat mode makes it easy to traverse the maze path, but it is not nearly as
  41. interesting as the recursive maze solution.
  42.  
  43. Recursive maze solution
  44. -----------------------
  45. Press 'r' to see an honest-to-goodness recursive maze solution. I wrote this,
  46. but don't ask me how it works. I haven't the foggiest. It works great though,
  47. doesn't it?
  48.  
  49. Next maze
  50. ---------
  51. Press 'n' to abandon the current maze and start a new one. There are seven
  52. mazes distributed with this version of the Hedge Row program. Will there ever
  53. be more? I don't know!
  54.  
  55. Exit
  56. ----
  57. Press Escape to exit the program. Isn't that easy?
  58.  
  59. Troubleshooting
  60. ---------------
  61. Hedge Row requires a mouse, SVGA card and monitor, and approximately 512K of
  62. extended or expanded memory to run. If any of these are missing, Hedge Row
  63. will not work.
  64.  
  65. If you have EMS or XMS memory and Hedge Row reports that you do not, check
  66. that other programs are not using that memory. On my system, I noticed
  67. Smartdrive was eating up all my extended memory. Turn Smartdrive off, or
  68. configure it to use less memory, so that Hedge Row can have some.
  69.  
  70. SVGA cards
  71. ----------
  72. Hedge Row should work on most SVGA cards. It uses Fastgraph to do a chipset
  73. autodetect and then does direct chipset support. If it does not find a chipset
  74. it knows, it will support Super VGA through the VESA BIOS extensions.
  75.  
  76. Please report any SVGA problems to Ted Gruber Software. If you have video
  77. hardware that Fastgraph does not support, we want to know about it.
  78.  
  79. Files in the distribution
  80. -------------------------
  81. HEDGE.EXE     the program
  82. HEDGE.DOC     this file
  83.  
  84. HEDGE.C       source code for the game
  85. HEDGE.H       prototypes for functions in HEDGE.C
  86. COMMON.C      source code for "often used" functions
  87. COMMON.H      prototypes for functions in COMMON.C
  88. DEFS.H        defines, includes, and global variables
  89.  
  90. DUBDINER.PCX  PCX file containing picture of dub diner
  91. HEDGE.PCX     PCX file containing maze tiles
  92. HEDGE.ATT     attributes of maze tiles (open on left, right, top, etc.)
  93.  
  94. MAZE001.LEV   \
  95. MAZE002.LEV    \
  96. MAZE003.LEV     \
  97. MAZE004.LEV       maze data for 7 different mazes
  98. MAZE005.LEV     /
  99. MAZE006.LEV    /
  100. MAZE007.LEV   /
  101.  
  102. Compiling and linking
  103. ---------------------
  104. Hedge Row requires Fastgraph 4.0 or Fastgraph/Light 4.0 or to link. You can
  105. download Fastgraph/Light from our BBS at (702) 796-7134, from our internet
  106. ftp site (ftp.accessnv.com), or from the CompuServe GAMDEV forum (GO GAMDEV).
  107.  
  108. I used the medium model to compile. The following commands show the
  109. compilation and linking sequences for each supported compiler:
  110.  
  111.    Borland C++:
  112.       BCC -mm HEDGE.C COMMON.C FGM.LIB
  113.  
  114.    Microsoft C/C++ and Visual C++:
  115.       CL /AM HEDGE.C COMMON.C /link FGM /STACK:6144
  116.  
  117.    Microsoft QuickC:
  118.       QCL /AM HEDGE.C COMMON.C /link FGM /STACK:6144
  119.  
  120.    Microsoft Visual C++ 32-bit Edition with Phar Lap TNT extender:
  121.       CL HEDGE.C COMMON.C /link /stub:\TNT\BIN\GOTNT.EXE FG32VC.LIB
  122.  
  123.    Power C:
  124.       PC /mm HEDGE
  125.       PC /mm COMMON
  126.       PCL HEDGE COMMON ;FGM
  127.  
  128.    Turbo C and Turbo C++:
  129.       TCC -mm HEDGE.C COMMON.C FGM.LIB
  130.  
  131.    Watcom C/C++ (16 bits):
  132.       WCL /mm HEDGE.C COMMON.C FGM.LIB
  133.  
  134.    Watcom C/C++ (32 bits) with Rational Systems DOS/4GW extender:
  135.       WCL386 /l=dos4g HEDGE.C COMMON.C FG32.LIB FG32DPMI.LIB
  136.  
  137.    Zortech C++:
  138.       ZTC -mm HEDGE.C COMMON.C FGM.LIB
  139.  
  140. If you are linking with Fastgraph/Light, replace the FGM library references
  141. with FGLM.
  142.  
  143. Stack considerations
  144. --------------------
  145. The recursive solution requires an increased stack size. The more vertices in
  146. the maze, the bigger stack you need. I increased the stack size by adding this
  147. to the Microsoft link command: /STACK:6144. This stack is big enough for most
  148. standard mazes. A really complicated maze would need a bigger stack.
  149.  
  150. Maze #7 has the most vertices.
  151.  
  152. How maze tiles work
  153. -------------------
  154. The tiles are 16x16 pixel rectangles, stored in the file HEDGE.PCX. Each tile
  155. represents a possible maze path: up and down, left to right, branch in 2 or 3
  156. directions, etc. They are numbered starting at 0 in the upper left corner,
  157. through 239 in the lower right. Not all the tiles are needed in the maze game,
  158. there are a bunch of "blank" tiles.
  159.  
  160. The layout array is defined like this:
  161.  
  162.    unsigned char layout[50][38];
  163.  
  164. It is a two dimensional array corresponding to the positions of the tiles on
  165. the SVGA screen. 50 tiles x 16 pixels = 800 pixels total, which is the
  166. horizontal resolution of the screen. Similarly, the vertical resolution is 600
  167. pixels, or 38 tiles x 16 pixels.
  168.  
  169. Tiles are stored on the hidden page and transferred to the visual page using
  170. fg_tcxfer. Color 0 is the transparent color, so the tiles can be superimposed
  171. on the DUBDINER.PCX picture without completely covering it.
  172.  
  173. Meanwhile, a clean copy of the dubdiner picture is stored offscreen on a
  174. logical page in EMS or XMS memory. When a new maze is drawn, the picture is
  175. copied to the visual page and a new sequence of tiles is drawn over it.
  176.  
  177. What I would add to Hedge Row to make it a real game
  178. ----------------------------------------------------
  179. For one thing, I would create a better intro screen. Also, I would use better
  180. fonts. The reason I used the ROM font is so you can link with the shareware
  181. version of Fastgraph. It would look better if I used Fastgraph/Fonts.
  182.  
  183. Also, I would generate about 100 more mazes. This is the main reason I never
  184. finished the program. Those mazes take a long time to create, and they get
  185. boring after a while.
  186.  
  187. I wrote some maze generation code, but the mazes were not attractive. In my
  188. opinion, mazes that have repetitious patterns look prettier. The computer-
  189. generated mazes were too random.
  190.  
  191. I would also add some challenges, such as a timer, some traps (quicksand?),
  192. monsters, and items such as hidden walls, secret keys, etc. I think it would
  193. be an interesting game if I had done those things, but I never got around to
  194. it...my hard disk is littered with half-finished games.
  195.  
  196. About dub diner
  197. ---------------
  198. The background picture, DUBDINER.PCX, was done by those great guys over at dub
  199. Media. Dub Media is dedicated to providing quality computer graphics to meet
  200. your needs and budget. Whether your reuqirements are VGA-resolution still
  201. images or broadcast-quality animation, dub Media can offer a creative
  202. alternative.
  203.  
  204. Dub Media sent me the diner file in a GIF format, but I converted it to a PCX
  205. file so my users can recompile and relink the source code with
  206. Fastgraph/Light. I also reorganized the palette colors a little so my maze
  207. path would be red and white. For an original of the dubdiner GIF, and
  208. information about other art, you can contact Alfred Woo and Mike Wall at:
  209.  
  210.   dub Media
  211.   75 Trapelo Road
  212.   Waltham, MA 02154
  213.   (617) 647-1101
  214.  
  215. About Fastgraph
  216. ---------------
  217. Fastgraph is a graphics library. You use it to write games. You can download
  218. the shareware version, or if you call me, I will mail it to you, along with
  219. more information, an order form and current prices.
  220.  
  221. Distribution permission
  222. -----------------------
  223. This program is being distributed primarily for Fastgraph users to use as an
  224. example to help them learn about Fastgraph. It is not a shareware program, and
  225. is not appropriate for vendor catalogs, retail sales, or CD-ROM distribution.
  226. This program may be distributed via bulletin boards and online services such
  227. as CompuServe. You may make copies of this program and give it to your friends
  228. as long as you don't charge them money for it. Any other type of distribution
  229. is prohibited unless you have written permission from the author.
  230.  
  231. Contacting the author
  232. ---------------------
  233.  
  234. Diana Gruber
  235. Ted Gruber Software
  236. PO Box 13408
  237. Las Vegas, NV  89112
  238. (702) 735-1980 (voice)
  239. (702) 796-7134 (bbs)
  240. (702) 735-4603 (fax)
  241.